<template>
	<view :style="$s.view_color">
		<my-navbar :name="nav_title"></my-navbar>
		<view>
			<mars-news-detail :options="options"></mars-news-detail>
		</view>
	</view>
</template>

<script>
	import { mapState,mapMutations } from 'vuex'
	export default {
		data() {
			return {
				nav_title:'常见问题',
				id:0,
				options: {
				  title: "",
				  content:"",
				}
			}
		},
		onLoad(option){
			this.id=option.id
		},
		onShow(){
			this.initData()
		},
		computed:{
			...mapState({
				$s:state => state.$style,
			}),
		},
		methods: {
			initData(){
				this.$u.api.articlesInfo({id:this.id}).then(res=>{
					this.options.title=res.data.title
					this.options.content=res.data.content
				})
			},
		}
	}
</script>

<style lang="scss">
</style>
